import 'package:flutter/material.dart';

class TextButton extends StatelessWidget {
  TextButton({
    @required this.onPressed,
    this.padding,
    this.child
  });

  final Function onPressed;
  final EdgeInsets padding;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Material(
      color: Colors.transparent,
      child: Ink(
        child: new InkWell(
          onTap: () {
            onPressed();
          },
          child: new Container(
              alignment: Alignment.center,
              padding: padding ?? const EdgeInsets.only(left: 20, right: 20),
              child: child ?? new Text('Link Button')
            )
        )
      )
    );
  }
}